/*******************************************************************************
 * Copyright (c) 2007, Geophysical Center RAS
 * Sergey Berezin, Dmitry Voitsekhovskiy
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms,
 * with or without modification, are permitted provided
 * that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * - Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * - Neither the name of the Geophysical Center RAS nor the names
 * of its contributors may be used to endorse or promote products
 * derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ******************************************************************************/
using System;

namespace VisualEsse.DataEngine.Types 
{
    public interface IArray2d
    {
        int Width { get; }  // Width of array
        int Height { get; } // Height of array
    }

	/// <summary>IScalarArray2d is an 2d array of double precision scalar values.
	/// IScalarArray2d provides methods for quering array dimensions and for 
	/// accessing array items</summary>
	public interface IScalarArray2d : IArray2d
	{		
		double this[int i,int j] { get; set; } // Value at (i,j)
	}

	public interface IRowBasedScalarArray2d : IScalarArray2d 
	{ 
		double[] GetRow(int row); // Row should be in [0..Height-1] range
	}

	public interface IColumnBasedScalarArray2d : IScalarArray2d 
	{
		double[] GetColumn(int column); // Column should be in [0..Width-1] range
	}

	public interface IDirectAccessScalarArray2d : IScalarArray2d 
	{
		double[,] Data { get; } // Returns entire array
	}

	public interface IRowBasedVector2dArray2d : IVector2dArray2d 
	{ 
		Vector2d[] GetRow(int row); // Row should be in [0..Height-1] range
	}

	public interface IColumnBasedVector2dArray2d : IVector2dArray2d 
	{
		Vector2d[] GetColumn(int column); // Column should be in [0..Width-1] range
	}

	public interface IDirectAccessVector2dArray2d : IVector2dArray2d 
	{
		Vector2d[,] Data { get; } // Returns entire array
	}

	public interface IRowBasedVector3dArray2d : IVector3dArray2d 
	{ 
		Vector3d[] GetRow(int row); // Row should be in [0..Height-1] range
	}

	public interface IColumnBasedVector3dArray2d : IVector3dArray2d 
	{
		Vector3d[] GetColumn(int column); // Column should be in [0..Width-1] range
	}

	public interface IDirectAccessVector3dArray2d : IVector3dArray2d 
	{
		Vector3d[,] Data { get; } // Returns entire array
	}


    public interface IArray3d
    {
        int Width { get; }
        int Height { get; }
        int Depth { get; }
    }


	public interface IScalarArray3d : IArray3d
	{
		double this[int i,int j,int k] { get; set; }
	}

	public interface IXSectionBasedScalarArray3d : IScalarArray3d 
	{
		IScalarArray2d GetSectionX(int i); // returns 2d array with (j,k) indices
	}

	public interface IYSectionBasedScalarArray3d : IScalarArray3d 
	{
		IScalarArray2d GetSectionY(int j); // returns 2d array with (i,k) indices
	}

	public interface IZSectionBasedScalarArray3d : IScalarArray3d 
	{
		IScalarArray2d GetSectionZ(int k); // returns 2d array with (i,j) indices
	}

	public interface IDirectAccessScalarArray3d : IScalarArray3d 
	{
		double[,,] Data { get; }
	}

	public interface IVector2dArray2d : IArray2d
	{
		Vector2d this[int i,int j] { get; set; }
	}

	public interface IVector3dArray2d 
	{
		int Width { get; }
		int Height { get; }
		Vector3d this[int i,int j] { get; set; }
	}

    public interface IVector2dArray3d : IArray3d
    {        
        Vector2d this[int i, int j, int k] { get; set; }
    }

	public interface IVector3dArray3d : IArray3d
	{		
		Vector3d this[int i,int j,int k] { get; set; }
	}

    public interface IDirectAccessVector3dArray3d : IVector3dArray3d
    {
        Vector3d[,,] Data { get; } // Returns entire array
    }
}